Namespace definitions

Functions and properties that are only accessible withing the scope of an operation.

Example

operation my_operation() {
print(op_context.exists()); // Prints true
}

query my_query() {
return op_context.exists(); // Returns false
}

Since

0.7.0

Properties

Link copied to clipboard

Provides the height of the block currently being built.

Link copied to clipboard

Indicates whether the code is being called from an operation.

Link copied to clipboard

Returns the timestamp of the last block in milliseconds.

Link copied to clipboard

Indicates the index of the operation being executed within the transaction.

Functions

Link copied to clipboard
function emit_event(type: text, data: gtv)

Emits an event with the provided type and data.

Link copied to clipboard

Gets all operations in this transaction.

Link copied to clipboard

Retrieves the current operation.

Link copied to clipboard

Returns a list of pubkeys representing the signers of the current transaction.

Link copied to clipboard
function is_signer(pubkey: byte_array): boolean

Checks if the provided public key is one of the signers of the current transaction.